<?php

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/

Route::get('welcome',function (\Illuminate\Http\Request $request){
    return view('welcome');
});
//支付回掉；
Route::any('alipay/notify','NotifyController@alipay_notify');
Route::any('wechat/notify','NotifyController@wechat_notify');


Route::group(['namespace'=>'Admin'],function (){
    Route::any('login','UserController@login');
    Route::get('authcode','UserController@authcode');

    Route::group(['middleware'=>['admin.login']],function (){
        Route::get('/','UserController@index');//Home
        Route::get('logout','UserController@logout');

        Route::any('goods/lists','GoodsController@lists');
        Route::any('goods/create','GoodsController@create');
        Route::any('goods/store','GoodsController@store');
        Route::any('goods/edit/{goods_id}','GoodsController@edit');
        Route::any('goods/update','GoodsController@update');
        Route::any('goods/up_down','GoodsController@up_down');
        Route::any('goods/hot','GoodsController@hot');
        Route::any('goods/like','GoodsController@like');


        Route::any('classify/lists','ClassifyController@lists');
        Route::any('classify/create','ClassifyController@create');
        Route::any('classify/edit','ClassifyController@edit');
        Route::any('classify/destory','ClassifyController@destory');

        Route::any('config/aboutus','ConfigController@aboutus');
        Route::any('config/interule','ConfigController@integral');
        Route::any('config/freight','ConfigController@freight');
        Route::any('config/interule_rule','ConfigController@interule_rule');
        Route::any('config/banner','ConfigController@banner_list');
        Route::any('config/banner_create','ConfigController@banner_create');
        Route::any('config/b_banner','ConfigController@b_banner');

        Route::any('config/version','ConfigController@version_list');
        Route::any('config/version_del','ConfigController@version_del');


        //审核
        Route::any('check/shop','CheckController@shop');
        Route::any('check/shop_del','CheckController@shop_del');
        Route::any('check/chest/{shop_id}','CheckController@chest');
        //分销商
        Route::any('check/businessman','CheckController@businessman');
        Route::any('check/businessman_del','CheckController@businessman_del');


        //A统计
        Route::any('count/order','CountController@order');
        Route::any('count/goods','CountController@goods');

        //B统计
        Route::any('count/b_order','CountController@b_order');
        Route::any('count/b_goods','CountController@b_goods');

        Route::any('count/ask','CountController@ask');
        Route::any('count/ask2','CountController@ask2');
        Route::any('count/ask3','CountController@ask3');
        Route::any('count/ask4','CountController@ask4');
        Route::any('count/ask5','CountController@ask5');
        Route::any('count/this_order','CountController@this_order');
        Route::any('count/this_all','CountController@this_all');
        Route::any('count/all_son','CountController@all_son');
    });

});


